let http =  require('http')
let url = require('url')

http.createServer((req, res) => {
  res.writeHead(200, {'Content-Type': 'text/plain; charset=utf-8'})

  // 解析 URL 参数
  let params = url.parse(req.url,  true).query
  res.write('网站名称：' + params.name)
  res.write('\n')
  res.write('网站url：' + params.url)
  res.end()
}).listen(3001)